package com.yami.shop.service;

import com.baomidou.mybatisplus.extension.service.IService;
import com.yami.shop.bean.model.ChannelUserRelationRecord;
import org.apache.ibatis.annotations.Param;

import java.util.List;
import java.util.Map;

public interface ChannelUserRelationRecordService extends IService<ChannelUserRelationRecord> {
    /**
     * 地址不用
     * @param address
     * @param chainCode
     * @return
     */
    ChannelUserRelationRecord getChannelAddressByaddress(String address, String chainCode);

    ChannelUserRelationRecord getinfoByUserIdChainCodeChannelCode(@Param("userId")String userId , @Param("chainCode")String chainCode, @Param("channelCode")String channelCode, @Param("type")String type);
    ChannelUserRelationRecord getUserByChannelUserId(@Param("channelUserId")String channelUserId, @Param("chainCode")String chainCode, @Param("channelCode")String channelCode);
    /**
     * 获取用户是否有微发行地址
     * @param userId
     * @param chainCode
     * @param channelCode
     * @return
     */
    Boolean isHasDTCAddress(String userId, String chainCode,String channelCode);

    void removeAddress(String userId, String chainCode,String channelCode);

    Boolean isHasAllAddress(String userId, String chainCode,String channelCode,String type );


    /**
     * 获取用户导入的渠道列表（圆圈列表）
     * @param userId
     * @return
     */
    List<Map<String,Object>> getHomeChannelList(String userId);

    /**
     * 新添加的链渠道列表
     * @param userId
     * @return
     */
    List<Map<String,Object>> getCreateUserChainChannelList(String userId);


    /**
     * 获取用户已添加钱包渠道列表
     * @param userId
     * @return
     */
    List<Map<String,Object>> getUserHasChannelList(String userId, String chainCode);


    /**
     * 获取用户渠道下链列表
     * @param userId
     * @param channelCode
     * @return
     */
    List<Map<String,Object>> getHomeChainList(String userId, String channelCode);

    /**
     * 获取用户已添加的链列表
     * @param userId
     * @return
     */
    List<Map<String,Object>> userBlockchain(String userId);

    List<Map<String,Object>> allChannelList(String chainCode);



    /**
     * 创建dtc
     * @param userId
     * @param chainCode
     * @param channelCode
     */
    void createDtcAddress(String userId, String chainCode,String channelCode);

    /**
     * 导入下游平台
     * @param userId
     * @param chainCode
     * @param channelCode
     * @return
     */
    ChannelUserRelationRecord exportChannelAddress(String userId, String chainCode, String channelCode);
    /**
     * 创建dtc和导入下游平台
     * @param userId
     * @param chainCode
     * @param channelCode
     */
    void createUserChannel(String userId, String chainCode,String channelCode);


    /**
     * 用户木链渠道下地址列表
     * @param userId
     * @param chainCode
     * @param channelCode
     * @return
     */
    List<ChannelUserRelationRecord> getUserAllAddress(String userId, String chainCode,String channelCode,Long isRed);

    Map<String,Object> getUserOneAddress(String userId, String type);

    /**
     * 随机获取渠道信息
     * @param userId
     * @param chainCode
     * @param channelCode
     * @return
     */
    Map<String,Object> getChannelInfo(String userId, String chainCode,String channelCode,String type);

    /**
     * 通过电话获取用户信息
     * @param userId
     * @param callPhone
     */
    Map<String,Object> getUserByCallPhone(String userId,String callPhone);
}

